var app = getApp();
Page({
  data: {
    carts: [],
    minusStatuses: [],
    selectedAllStatus: true,
    saveHidden: true,
    total: '',
    startX: 0,
    itemLefts: []
  },
  onLoad: function () {
    
    var that = this
    app.ajaxJson('/category/list', {}, function (res) {
      var json = res.data;
      if (json.code != 200) {
        return;
      }
      that.setData({
        carts: json.data
      });
      // that.sum();
    });

  },
  bindViewTap: function (e) {
      var param = e.currentTarget.dataset;
      var id = param["id"];
      wx.navigateTo({
          url: '../product/list/list?id=' + 1
      })
  }

})